From ea0084cd995283dee00a327c92d9896994e738e1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 8 Jan 2016 11:29:58 -0500 Subject: [PATCH] x11: Keep the drag window alive longer We destroy the widget that is wrapped around the drag window when the object data on the drag context gets cleared. Destroying the window before that happens leads to unpleasantries. E.g. we may try to access the frame clock, which doesn't exist anymore, and things go downhill from there. So, keep the window alive for a little longer. --- gdk/x11/gdkdnd-x11.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c index 6bc87c43c2..dd0725262c 100644 --- a/gdk/x11/gdkdnd-x11.c +++ b/gdk/x11/gdkdnd-x11.c @@ -223,6 +223,7 @@ gdk_x11_drag_context_finalize (GObject *object) { GdkDragContext *context = GDK_DRAG_CONTEXT (object); GdkX11DragContext *x11_context = GDK_X11_DRAG_CONTEXT (object); + GdkWindow *drag_window; if (context->source_window) { @@ -235,7 +236,12 @@ gdk_x11_drag_context_finalize (GObject *object) contexts = g_list_remove (contexts, context); + drag_window = context->drag_window; + G_OBJECT_CLASS (gdk_x11_drag_context_parent_class)->finalize (object); + + if (drag_window) + gdk_window_destroy (drag_window); } /* Drag Contexts */ -- 2.30.2